#include <cstdio>
#include <cassert>
#include <iostream>
#include <string>
//#include <boost>
using std::string;

template<typename T>
void prettyPrint(T value,char* buf);

template<> void prettyPrint<char>(char value,char*buf){
	sprintf(buf,"%c",value);
}

template<> void prettyPrint<int>(int value,char* buf){
	sprintf(buf,"%d",value);
}

int main(){
	char buf[2];
	int value=123456789;
	int wc=sprintf(buf,"%d",value);
	printf("write %d\n",wc);
	assert(value==123456789);
	buf[10]='\0';
	printf("%s\n",buf);
	
	/*
	std::stringstream temp;
	temp<<"hello"<<123;
	std::string s=temp.str();
	printf("%s\n",s);
	*/
//	string s = lexical_cast<string>(0);
	return 0;
}